<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>v-show</title>
  </head>
  <body>
    <div id="app">
      <h2 v-show="score>=60" style="color: green">欢迎来尚硅谷学习!</h2>
      <h3 v-show="score<50" style="color: red">
        很遗憾, 你的入学测试没有通过，可以考虑UI或测试
      </h3>
      <h4 v-show="score<60 && score>=50" style="color: yellow">
        此次测试没有完全通过, 可选择复试
      </h4>
    </div>

    <script src="https://cdn.bootcdn.net/ajax/libs/vue/3.2.31/vue.global.min.js"></script>
    <script>
      const { createApp } = Vue

      createApp({
        data() {
          return {
            score: 55,
          }
        },
        methods: {
          examAgin() {
            this.score += 10
          },
        },
      }).mount('#app')
    </script>
  </body>
</html>
